package nf.traversal;

import nf.graph.Graph;
import nf.graph.Delta;

public class FairPairwiseTraverser extends PairwiseTraverser
{
	public FairPairwiseTraverser(Graph network)
	{
		super(network);
	}
	
	public void reportResult(Delta changes)
	{
		super.reportResult(changes);
		
		if (!changes.isEmpty())
			eliminateNodes();
	}
	
	public static class Factory implements TraverserFactory
	{
		public Traverser createTraverser(Graph network)
		{
			return new FairPairwiseTraverser(network);
		}
	}
}
